<template>
  <div class="siteMaintenance">
    <!-- 头部 --start-->
    <div class="nav">
      <p>
        <span>.</span>
        {{header}}
      </p>
      <div id="nav_go5">
        <el-button
          type="info"
          icon="el-icon-back"
          class="btn_fanhui"
          @click="revert()"
        >返回
        </el-button
        >
      </div>
    </div>
    <!--主题内容部分开始-->
    <div class="Main">
      <p>现场物料申请单</p>
      <div class="header">
        <ul>
          <li>
            <span>主机厂 :</span>
            <el-input style="width: 50%;"></el-input>
          </li>
        </ul>
        <ul>
          <li>
            <span>车型</span>
            <el-input style="width: 60%;"></el-input>
          </li>
          <li>
            <span>装箱发货清单号/机组号</span>
            <el-input style="width: 60%;"></el-input>
          </li>
          <li>
            <span>联系人</span>
            <el-input style="width: 60%;"></el-input>
          </li>
          <li>
            <span>地址</span>
            <el-input style="width: 60%;"></el-input>
          </li>
          <li>
            <span>联系方式</span>
            <el-input style="width: 60%;"></el-input>
          </li>
        </ul>
      </div>
      <div class="footer">
        <div class="footer-left">
          <template>
            <el-table
              :data="tableData"
              style="width: 100%">
              <el-table-column
                prop="date"
                label="零件名称"
                width="180">
              </el-table-column>
              <el-table-column
                prop="name"
                label="零件图号"
                width="180">
              </el-table-column>
              <el-table-column
                prop="address"
                label="数量">
              </el-table-column>
              <el-table-column
                prop="address"
                label="申请原因">
              </el-table-column>
            </el-table>
          </template>
        </div>
        <div class="footer-right">
          <div>
            <span>
              发货方式
            </span>
            <el-input style="width: 20%;"></el-input>
          </div>
          <div class="beizu">
            <span>
              备注
            </span>
            <el-input
              type="textarea"
              :autosize="{ minRows: 4, maxRows: 6}"
              placeholder="请输入内容"
              v-model="textarea"
              style="width: 70%;"
            >
            </el-input>
          </div>
        </div>
      </div>
    </div>

    <div class="bottom">
      <el-button type="primary" size="medium">确定</el-button>
      <el-button type="info" size="medium" @click="revert()">返回</el-button>
    </div>
  </div>
</template>


<script>
import axios from "axios";

export default {


  data() {
    return {
      textarea:"",
      tableData:[{}],
      header:"申请审核"
    };
  },
  created() {
    console.log(this.$route)
    this.shows = this.$route.query.shows
    if(this.shows == 0) {
      this.header =  "申请审核"
    } else {
      this.header = "申请详情"
    }
  },
  methods: {
    //返回
    revert() {
      this.$router.go(-1);
    },
  }
}

</script>
<style lang="scss" scoped>
@import "@/assets/scss/base.scss";
.nav {
  height: 60px;
  padding: 0 1%;
  position: relative;

  p {
    height: 40px;
    margin: 10px 0;
    line-height: 40px;

    span {
      background: $Header_color;
      color: $Header_color;
    }
  }

  #nav_go5 {
    position: absolute;
    top: 10px;
    right: 1%;

    img {
      height: 16px;
      padding-right: 10px;
    }
  }
}
.Main {
  width: 98%;
  //margin-left: 10px;
  margin: auto;
  background: #fff;
  p {
    text-align: center;
    font-weight: 700;
    font-size: 20px;
    border-bottom: 1px solid rgb(220, 222, 226);
    width: 98%;
    margin-left: 15px;
    padding-bottom: 15px;
    padding-top: 15px;
  }

  .header {
    border-bottom: 1px solid rgb(220, 222, 226);
    width: 98%;
    //margin-left: 15px;
    padding-bottom: 20px;
    margin: auto;
    ul {
      width: 100%;
      display: flex;
      flex-wrap: wrap;
      color: #909399;
      margin-top: 20px;
      li {
        width: 33%;
        font-size: 14px;
        margin-bottom: 10px;
        text-align: center;
        span {
          display: inline-block;
          width:38%;
        }
      }
    }
  }
  .footer {
    display: flex;
    justify-content: space-between;
    width: 98%;
    margin: auto;
    margin-top: 20px;
    padding-bottom: 30px;
    .footer-left {
      width: 49%;
      /deep/ .is-leaf {
        text-align: center;
        background: #ffffff;

      }


    }
    .footer-right {
      width: 48%;
      .beizu{
        margin-top: 15px;

      }
      div {
        text-align: center;
        display: flex;
        align-items:center;
        span {
          display: inline-block;
          width: 20%;
        }
      }
    }
  }
}
.bottom {
  padding-top: 20px;
  text-align: center;
}
</style>
